package com.itheima.a_oop;

/**
 * 目标：对象的内存分配原理（多个对象在计算机中的执行原理）
 */
public class Demo03 {

    public static void main(String[] args) {
        //创建一个学生对象
        Student s1 = new Student();
        s1.name = "张三丰";
        s1.math = 90;
        s1.chinese = 80;
        s1.printTotalScore();
        s1.printAverageScore();

        //再创建一个学生对象
        Student s2 = new Student();
        s2.name = "李四海";
        s2.math = 100;
        s2.chinese = 100;
        s2.printTotalScore();
        s2.printAverageScore();
    }

}
